package com.koala.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.koala.dao.SysUserMapper;
import com.koala.dto.UserAuthRespVO;
import com.koala.entity.pojo.SysUser;
import com.koala.service.SysUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;

/**
 * 用户业务实现类
 *
 * @author haoxr
 * @date 2022/1/14
 */
@Service
@RequiredArgsConstructor
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    private final PasswordEncoder passwordEncoder;


    /**
     * 根据用户名获取认证信息
     *
     * @param username
     * @return
     */
    @Override
    public UserAuthRespVO getAuthInfoByUsername(String username) {
        UserAuthRespVO userAuthInfo = this.baseMapper.getAuthInfoByUsername(username);
        return userAuthInfo;
    }

}
